home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 108
/
jogo-disk-108.iso
/
Games
/
simple_tower_defense.swf
/
scripts
/
frame_3
/
PlaceObject3_248_219
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2010-05-15
|
1KB
|
70 lines
onClipEvent(enterFrame){
if(_root.go == true)
{
this.removeMovieClip();
}
elb._width = el / ex * 34;
sc++;
if(sc >= stm)
{
slow = false;
}
if(slow == true)
{
_X = _X + xs / 6;
_Y = _Y + ys / 6;
}
if(slow == false)
{
_X = _X + xs;
_Y = _Y + ys;
}
if(_X < -20 && paid == false)
{
paid = true;
_root.deadenemies = _root.deadenemies + 1;
_root.lives -= 1;
this.removeMovieClip();
}
if(_root.lives <= 0)
{
_root.go = true;
_root.gotoAndStop(6);
}
if(el <= 0 && paid == false)
{
_root.cash += _root.lc;
_root.score += ex;
_root.deadenemies = _root.deadenemies + 1;
paid = true;
}
if(el <= 0 && paid == true)
{
this.removeMovieClip();
}
if(_root.goleft.hitTest(_X,_Y,true))
{
eb._rotation = 0;
xs = - s;
ys = 0;
}
if(_root.goright.hitTest(_X,_Y,true))
{
eb._rotation = 180;
xs = s;
ys = 0;
}
if(_root.goup.hitTest(_X,_Y,true))
{
eb._rotation = 90;
xs = 0;
ys = - s;
}
if(_root.godown.hitTest(_X,_Y,true))
{
eb._rotation = 270;
xs = 0;
ys = s;
}
}